package com.songlanyun.modules.chain.model.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.songlanyun.common.drive.ValueObject;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 代币充值通知
 * @author zhangqh
 */
@Data
public class ChainNoticeRechargeDTO implements ValueObject {

    private static final long serialVersionUID = -6603340350103289898L;

    @NotNull(message = "用户id不能为空！")
    private Long uid;

    @NotBlank(message = "账户地址不能为空！")
    @JsonProperty(value = "toAddress")
    private String toAddress;

    @NotNull(message = "充值积分不能为空！")
    @DecimalMin(value = "0", message = "充值数量必须大于0！")
    private BigDecimal amount;

    @NotBlank(message = "业务流水号不能为空！")
    @JsonProperty(value = "bsId")
    private String bsId;

}
